package com.googlecode.gwtbb.client.only.widget.form;

import com.google.gwt.user.client.ui.*;

/**
 * @author Abraham Grief
 * @version $Id$
 * @since Jul 23, 2008
 */
public class ButtonBar extends Composite {
	private HorizontalPanel buttonPanel;

	public ButtonBar() {
		buttonPanel = new HorizontalPanel();
		initWidget(buttonPanel);
		buttonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		buttonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
		buttonPanel.setWidth("100%");
		buttonPanel.setStylePrimaryName("gwtbb-ButtonBar");
	}

	public void add(Widget w) {
		buttonPanel.add(w);
	}

	public boolean remove(Widget w) {
		return buttonPanel.remove(w);
	}
}
